namespace Aesha.WoW.Broker.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class v7 : DbMigration
    {
        public override void Up()
        {
            RenameTable(name: "dbo.ItemSummaries", newName: "ItemSummary");
            AddColumn("dbo.ItemSummary", "MovementLastDay", c => c.Int(nullable: false));
            AddColumn("dbo.ItemSummary", "MovementLastWeek", c => c.Int(nullable: false));
            AddColumn("dbo.ItemSummary", "AverageBuyOutPriceLastDay", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AddColumn("dbo.ItemSummary", "AvergaeBuyOutPriceLastWeek", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AddColumn("dbo.ItemSummary", "StdDev", c => c.Decimal(nullable: false, precision: 18, scale: 2));
            AlterColumn("dbo.Items", "Icon", c => c.String(maxLength: 50, unicode: false));
        }
        
        public override void Down()
        {
            AlterColumn("dbo.Items", "Icon", c => c.String(nullable: false, maxLength: 50, unicode: false));
            DropColumn("dbo.ItemSummary", "StdDev");
            DropColumn("dbo.ItemSummary", "AvergaeBuyOutPriceLastWeek");
            DropColumn("dbo.ItemSummary", "AverageBuyOutPriceLastDay");
            DropColumn("dbo.ItemSummary", "MovementLastWeek");
            DropColumn("dbo.ItemSummary", "MovementLastDay");
            RenameTable(name: "dbo.ItemSummary", newName: "ItemSummaries");
        }
    }
}
